import core.Downloader;
import util.LogUtils;

import java.io.IOException;
import java.util.Scanner;

public class Main {
    //https://dldir1.qq.com/qqfile/qq/PCQQ9.7.17/QQ9.7.17.29230.exe
    public static void main(String[] args) throws IOException {
        //下载地址
        String url =null;
        if(args==null||args.length==0){
            for(;;){
//                System.out.println("请输入下载链接");
                LogUtils.info("请输入下载链接地址：");
                Scanner scanner = new Scanner(System.in);
                url = scanner.next();
                if(url!=null){
                    break;
                }
            }
        }else{
            url=args[0];
        }
        Downloader downloader = new Downloader();
        downloader.download(url);

    }
}